/*
 * @Author: your name
 * @Date: 2021-01-15 10:48:47
 * @LastEditTime: 2021-01-15 11:17:11
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \carlist\src\components\CarList\index.js
 */
import React, { Component } from './node_modules/react'

export default class CarList extends Component {
    goQuotation=()=>{
        let {car_name,car_id,market_attribute}=this.props;
        this.props.goQuotationFn({car_name,car_id,market_attribute})
    }
    render() {
        console.log(this.props)
        let { car_name, trans_type, gear_num, horse_power, market_attribute} = this.props
        return (
            <div className="item">
               <ul className="tops">
        <li><span>{market_attribute.year}</span><span>{car_name}</span></li>
                    <li>{horse_power}马力{gear_num}{trans_type}</li>
                    <li><p>指导价{market_attribute.official_refer_price}</p><span>{market_attribute.official_refer_price}起</span></li>
                </ul>
                <div className="bots">
                    <p onClick={()=>this.goQuotation()}>询问低价</p>
                </div>
            </div>
        )
    }
}
